Networks are growing ever larger, and some mechanisms used for routing packets in networks in smaller networks do not scale well for large-scale networks. A data center may have thousands of nodes, and many data centers may be connected together by networks or an extended network. Customers desire to steer traffic belonging to different traffic classes through different paths in a network. An existing technology, referred to as policy-based routing (PBR), supports this and is scalable. Yet, routers and switches in networks have electronic circuitry that is limited by transistor count, chip size, board size, energy consumption and other practical considerations as to size and scalability. While policy-based routing supports matching on packet fields, and more, which can be implemented using software and/or specialized memory, the route scale that can be handled by a typical router or switch is limited by available transistor counts and sizes of such specialized memory, or software execution speed, or both. It is within this context that the embodiments arise.